// pages/zxfl/zxfl.js
Page({

  data: {
    flList: [],
  },
  onLoad() {
    wx.request({
      url: 'http://127.0.0.1:8080/zxfl',
      method: 'GET',
      success: res => {
        console.log(res)
        this.setData({
          flList: res.data.data
        })
        console.log(this.data.flList)
      }

    })
  },

  tjzx(){
    console.log("eee")
    wx.navigateTo({
      url: '/pages/tiangjiazx/tiangjiazx'
    })
  },

  gotozx(e) {
    console.log(e)
    let id=e.currentTarget.dataset.id
    let index=e.currentTarget.dataset.index
    getApp().updateGlobalData(id); 
    const fls_id = getApp().globalData.fl_id;
    console.log(id)
    console.log(fls_id)
    wx.navigateTo({
      url: '/pages/zx/zx?id='+fls_id+"&index="+index,
    })
  },

})